Skip to content

feat: add flow comparison to diff two .drawd files#28

Merged
trmquang93 merged 2 commits intomainfrom
feat/flow-diffing
Apr 11, 2026
Merged

feat: add flow comparison to diff two .drawd files#28
trmquang93 merged 2 commits intomainfrom
feat/flow-diffing

Conversation

@trmquang93
Copy link
Copy Markdown
Collaborator

Summary

  • Add Compare Flows option to the File menu that opens a .drawd file picker and diffs the selected file against the current canvas
  • New diffFlows() utility compares all entity types (screens, connections, hotspots, documents, data models, sticky notes, screen groups) by ID with field-level change tracking
  • Uses fingerprinting for large fields (imageData, svgContent) to avoid multi-MB string comparisons
  • New FlowDiffModal displays a color-coded summary (green/red/yellow) with collapsible categories and expandable per-field change details

Test plan

  • 16 unit tests for diffFlows covering identical flows, added/removed/modified entities, image fingerprinting, hotspot sub-diffs, metadata exclusions, and summary count consistency
  • Manual: open editor with a flow, File > Compare Flows, select a different .drawd file -- verify diff modal shows correct categorized changes
  • Manual: compare identical file -- verify "No differences found" message
  • Manual: cancel file picker -- verify no error or modal appears
  • Lint passes
  • Build succeeds

Add "Compare Flows" to the file menu that lets users select a .drawd
file and see a structured diff against the current canvas -- added,
removed, and modified entities across all categories with field-level
change details.
@trmquang93 trmquang93 merged commit d9e0d97 into main Apr 11, 2026
1 check passed
@github-actions github-actions bot deleted the feat/flow-diffing branch April 11, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant